

class XinHeConfigDefine {

  static  XinHeEnvConfig envConfig = _getEnvConfig();

  // static final XinHeEnvConfig _testConfig = XinHeEnvConfig('', 'https://194p151a90.vicp.fun','');
  // static final XinHeEnvConfig _testConfig = XinHeEnvConfig('', 'http://39.108.239.140:8088','');
  static final XinHeEnvConfig _testConfig = XinHeEnvConfig('', 'https://manage.xianghehgh.com/api','');

  static final XinHeEnvConfig _devConfig = XinHeEnvConfig('', 'https://manage.xianghehgh.com/api','');
  static final XinHeEnvConfig _onlinetConfig = XinHeEnvConfig('', 'https://manage.xianghehgh.com/api','');



  static const appEnv = String.fromEnvironment(XinHeEnvName.envKey);

  static XinHeEnvConfig _getEnvConfig() {
    switch(appEnv){
      case XinHeEnvName.test:
        return _testConfig;
      case XinHeEnvName.dev:
        return _devConfig;
      case XinHeEnvName.online:
        return _onlinetConfig;
      default:
        return _testConfig;

    }
  }

}

abstract class XinHeEnvName {
  ///环境  key
  static const String envKey = 'app_env';

  ///环境 value
  static const String test = 'test';///测试环境
  static const String dev = 'dev';///生产环境测试
  static const String online = 'online';///线上
}


class XinHeEnvConfig {
  final String? domain;
  final String? prefix;
  final String? suffix;
  XinHeEnvConfig(this.domain,this.prefix,this.suffix);

}